package com.cq.aop.impl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.cq.aop.HelloWorld;

public class AopTest {

    public static void main(String[] args) {
        ApplicationContext ctx = 
                new ClassPathXmlApplicationContext("resource/springmvc.xml");
            
        HelloWorld hw1 = (HelloWorld)ctx.getBean("helloWorldImplOne");
        HelloWorld hw2 = (HelloWorld)ctx.getBean("helloWorldImplTwo");
        AutoTest auto = (AutoTest)ctx.getBean("autoTest");
        hw1.printHelloWorld();
        System.out.println();
        hw1.doPrint();
//        
//        System.out.println();
//        hw2.printHelloWorld();
//        System.out.println();
//        hw2.doPrint();
          auto.autos();

    }

}
